# Maintainer: Justin Davis <jrcd83@gmail.com>
# $Id: PKGBUILD 86661 2013-03-20 23:31:54Z eric $

pkgname=perl-sub-exporter
pkgver=0.985
pkgrel=1
pkgdesc="a sophisticated exporter for custom-built routines"
arch=(any)
license=(PerlArtistic GPL)
options=(!emptydirs)
depends=('perl>=5.6.0' 'perl-data-optlist>=0.1' 'perl-params-util>=0.14'
         'perl-sub-install>=0.92')
url="https://metacpan.org/release/Sub-Exporter"
source=("http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/Sub-Exporter-${pkgver}.tar.gz")
md5sums=('233b9a1d86a4395de7e1afe5b60632b7')

build() {
  ( export PERL_MM_USE_DEFAULT=1 PERL5LIB=""                 \
      PERL_AUTOINSTALL=--skipdeps                            \
      PERL_MM_OPT="INSTALLDIRS=vendor"     \
      PERL_MB_OPT="--installdirs vendor" \
      MODULEBUILDRC=/dev/null

    cd Sub-Exporter-${pkgver}
    /usr/bin/perl Makefile.PL
    make
  )
}

check() {
  ( export PERL_MM_USE_DEFAULT=1 PERL5LIB=""
    cd Sub-Exporter-${pkgver}
    make test
  )
}

package() {
    cd Sub-Exporter-${pkgver}
    make DESTDIR="$pkgdir" install
}

# Local Variables:
# mode: shell-script
# sh-basic-offset: 2
# End:
# vim:set ts=2 sw=2 et:
